import { get, post } from '../http'

// 采购计划日志列表
export const findPurchasePlanLogPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/findPurchasePlanLogPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 采购明细日志列表
export const findPurchaseItemLogPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/item/findStayPurchaseItemLogPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 采购明细日志列表
export const findPurchaseLogPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/findPurchaseLogPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 采购交货日志列表
export const findDeliveryLogPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/delivery/findDeliveryLogPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 采购报价日志列表
export const findPurchaseQuoteLogPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/quote/findPurchaseQuoteLogPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 采购报价日志列表-供应商
export const findSupplierQuoteLogPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/quote/findSupplierQuoteLogPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 汇率
export const findExchangeRateLogPage = async (paylaod?: any) => {
  return await get('/user/v1/exchange/rate/findExchangeRateLogPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// FBA发货单日志列表
export const findFbaShipmentLogPage = async (paylaod?: any) => {
  return await get('/procurement/v1/fba/shipment/findFbaShipmentLogPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 自发货订单日志
export const listOrderLogs = async (paylaod?: any) => {
  return await post('/oms/orderLog/page', paylaod)
}

// 供应商订单
export const findSupplierPurchaseLogPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/findSupplierPurchaseLogPage', paylaod)
}

// 供应商交货单
export const findSupplierDeliveryLogPage = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/delivery/findSupplierDeliveryLogPage', paylaod)
}

// 产品日志
export const pageProductLog = (paylaod?: any) => {
  return get('/product/productLog/pageProductLog', paylaod)
}
// 采购报价变更日志列表
export const findPurchaseQuoteChangeLogPage = (paylaod?: any) => {
  return get('/procurement/v1/purchase/quote/change/findPurchaseQuoteChangeLogPage', paylaod)
}
// 供应商-采购报价变更日志列表
export const findSupplierQuoteChangeLogPage = (paylaod?: any) => {
  return get('/procurement/v1/purchase/quote/change/findSupplierQuoteChangeLogPage', paylaod)
}

// 数据权限日志
export const pageDataPermissonGroupLog = (paylaod?: any) => {
  return get('/user/v1/dataPermission/pageDataPermissonGroupLog', paylaod)
}
// 分页查询在线商品日志
export const amzProductSaleLog = (paylaod?: any) => {
  return get('/product/amzProductSale/pageLog', paylaod)
}
// 定制单页面日志
export const getCustomPurchaseLog = async (paylaod?: any) => {
  return await post('/procurement/v1/customOrderPurchase/pageCustomOrderPurchaseLog', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 采购申购单日志列表
export const findPurchasePlanLogPageV2 = (paylaod?: any) => {
  return get('/procurement/v1/purchase/plan/v2/findPurchasePlanLogPage', paylaod)
}
// 采购入库单日志列表
export const findReceiptLogPage = (paylaod?: any) => {
  return get('/procurement/v1/purchase/receipt/v2/findReceiptLogPage', paylaod)
}
// 采购订单日志列表
export const findPurchaseLogPageV2 = (paylaod?: any) => {
  return get('/procurement/v1/purchase/order/v2/findPurchaseLogPage', paylaod)
}
// 采购订单日志列表
export const findDeliveryLogPageV2 = (paylaod?: any) => {
  return get('/procurement/v1/purchase/delivery/v2/findDeliveryLogPage', paylaod)
}
